﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace Alex_s_Dream_The_Toy_World
{
    public class AIPhysicsComponent: CharacterPhysicsComponent
    {
        public AIPhysicsComponent(BaseEntity parent, ShapeType type, float density)
            : base(parent, type, density)
        {
            ActivateComponent();
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            MsgGetAIMovement msgGetMovement = ObjectPool.Aquire<MsgGetAIMovement>();
            msgGetMovement.UniqueTarget = this.parentEntity.UniqueID;
            this.parentEntity.Game.SendMessage(msgGetMovement);

            ProcessMovementFromInput(msgGetMovement.Data);
        }
    }
}
